3.1.29 \(\int (a+b \log (c x^n)) \log (d (\frac {1}{d}+f x^2)) \, dx\) [29]

Optimal. Leaf size=182 \[ 4 b n x-\frac {2 b n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}-b n x \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {i b n \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+\frac {i b n \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}} \]

[Out]

4*b*n*x-2*x*(a+b*ln(c*x^n))-b*n*x*ln(d*f*x^2+1)+x*(a+b*ln(c*x^n))*ln(d*f*x^2+1)-2*b*n*arctan(x*d^(1/2)*f^(1/2)
)/d^(1/2)/f^(1/2)+2*arctan(x*d^(1/2)*f^(1/2))*(a+b*ln(c*x^n))/d^(1/2)/f^(1/2)-I*b*n*polylog(2,-I*x*d^(1/2)*f^(
1/2))/d^(1/2)/f^(1/2)+I*b*n*polylog(2,I*x*d^(1/2)*f^(1/2))/d^(1/2)/f^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 182, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {2498, 327, 211, 2417, 4940, 2438, 209} \begin {gather*} -\frac {i b n \text {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+\frac {i b n \text {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+\frac {2 \text {ArcTan}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}+x \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )-2 x \left (a+b \log \left (c x^n\right )\right )-\frac {2 b n \text {ArcTan}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-b n x \log \left (d f x^2+1\right )+4 b n x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])*Log[d*(d^(-1) + f*x^2)],x]

[Out]

4*b*n*x - (2*b*n*ArcTan[Sqrt[d]*Sqrt[f]*x])/(Sqrt[d]*Sqrt[f]) - 2*x*(a + b*Log[c*x^n]) + (2*ArcTan[Sqrt[d]*Sqr
t[f]*x]*(a + b*Log[c*x^n]))/(Sqrt[d]*Sqrt[f]) - b*n*x*Log[1 + d*f*x^2] + x*(a + b*Log[c*x^n])*Log[1 + d*f*x^2]
 - (I*b*n*PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x])/(Sqrt[d]*Sqrt[f]) + (I*b*n*PolyLog[2, I*Sqrt[d]*Sqrt[f]*x])/(Sqr
t[d]*Sqrt[f])

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2417

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> With[
{u = IntHide[Log[d*(e + f*x^m)^r], x]}, Dist[(a + b*Log[c*x^n])^p, u, x] - Dist[b*n*p, Int[Dist[(a + b*Log[c*x
^n])^(p - 1)/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, r, m, n}, x] && IGtQ[p, 0] && RationalQ[m] && (EqQ[
p, 1] || (FractionQ[m] && IntegerQ[1/m]) || (EqQ[r, 1] && EqQ[m, 1] && EqQ[d*e, 1]))

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2498

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)], x_Symbol] :> Simp[x*Log[c*(d + e*x^n)^p], x] - Dist[e*n*p, Int[
x^n/(d + e*x^n), x], x] /; FreeQ[{c, d, e, n, p}, x]

Rule 4940

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[I*(b/2), Int[Log[1 - I*c*x
]/x, x], x] - Dist[I*(b/2), Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rubi steps

\begin {align*} \int \left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right ) \, dx &=-2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}+x \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-(b n) \int \left (-2+\frac {2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f} x}+\log \left (1+d f x^2\right )\right ) \, dx\\ &=2 b n x-2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}+x \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-(b n) \int \log \left (1+d f x^2\right ) \, dx-\frac {(2 b n) \int \frac {\tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{x} \, dx}{\sqrt {d} \sqrt {f}}\\ &=2 b n x-2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}-b n x \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {(i b n) \int \frac {\log \left (1-i \sqrt {d} \sqrt {f} x\right )}{x} \, dx}{\sqrt {d} \sqrt {f}}+\frac {(i b n) \int \frac {\log \left (1+i \sqrt {d} \sqrt {f} x\right )}{x} \, dx}{\sqrt {d} \sqrt {f}}+(2 b d f n) \int \frac {x^2}{1+d f x^2} \, dx\\ &=4 b n x-2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}-b n x \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {i b n \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+\frac {i b n \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-(2 b n) \int \frac {1}{1+d f x^2} \, dx\\ &=4 b n x-\frac {2 b n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}-b n x \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {i b n \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+\frac {i b n \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 254, normalized size = 1.40 \begin {gather*} -2 a x+\frac {2 a \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-2 b x \left (-n-n \log (x)+\log \left (c x^n\right )\right )+\frac {2 b \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (-n-n \log (x)+\log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}+a x \log \left (1+d f x^2\right )+b x \left (-n+\log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-2 b d f n \left (\frac {x (-1+\log (x))}{d f}+\frac {i \left (\log (x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )+\text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )\right )}{2 d^{3/2} f^{3/2}}-\frac {i \left (\log (x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )+\text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )\right )}{2 d^{3/2} f^{3/2}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])*Log[d*(d^(-1) + f*x^2)],x]

[Out]

-2*a*x + (2*a*ArcTan[Sqrt[d]*Sqrt[f]*x])/(Sqrt[d]*Sqrt[f]) - 2*b*x*(-n - n*Log[x] + Log[c*x^n]) + (2*b*ArcTan[
Sqrt[d]*Sqrt[f]*x]*(-n - n*Log[x] + Log[c*x^n]))/(Sqrt[d]*Sqrt[f]) + a*x*Log[1 + d*f*x^2] + b*x*(-n + Log[c*x^
n])*Log[1 + d*f*x^2] - 2*b*d*f*n*((x*(-1 + Log[x]))/(d*f) + ((I/2)*(Log[x]*Log[1 + I*Sqrt[d]*Sqrt[f]*x] + Poly
Log[2, (-I)*Sqrt[d]*Sqrt[f]*x]))/(d^(3/2)*f^(3/2)) - ((I/2)*(Log[x]*Log[1 - I*Sqrt[d]*Sqrt[f]*x] + PolyLog[2,
I*Sqrt[d]*Sqrt[f]*x]))/(d^(3/2)*f^(3/2)))

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.14, size = 643, normalized size = 3.53

method result size
risch \(x \ln \left (d f \,x^{2}+1\right ) a -2 \ln \left (c \right ) b x +i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) x +\frac {2 a \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}+4 b n x +\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x \ln \left (d f \,x^{2}+1\right )}{2}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) x \ln \left (d f \,x^{2}+1\right )}{2}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x \ln \left (d f \,x^{2}+1\right )}{2}-\frac {b n \sqrt {-d f}\, \ln \left (x \right ) \ln \left (1+x \sqrt {-d f}\right )}{d f}+\frac {b n \sqrt {-d f}\, \ln \left (x \right ) \ln \left (1-x \sqrt {-d f}\right )}{d f}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}-\frac {b n \sqrt {-d f}\, \dilog \left (1+x \sqrt {-d f}\right )}{d f}+\frac {b n \sqrt {-d f}\, \dilog \left (1-x \sqrt {-d f}\right )}{d f}+b \ln \left (c \right ) x \ln \left (d f \,x^{2}+1\right )+\frac {2 b \ln \left (c \right ) \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}+b \ln \left (d f \,x^{2}+1\right ) \ln \left (x^{n}\right ) x +\frac {2 b \arctan \left (\frac {x d f}{\sqrt {d f}}\right ) \ln \left (x^{n}\right )}{\sqrt {d f}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}-2 a x -\frac {2 b \arctan \left (\frac {x d f}{\sqrt {d f}}\right ) n \ln \left (x \right )}{\sqrt {d f}}-\frac {2 b n \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}-2 b x \ln \left (x^{n}\right )+i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} x -b n x \ln \left (d f \,x^{2}+1\right )-\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}-i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x -\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} x \ln \left (d f \,x^{2}+1\right )}{2}-i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x\) \(643\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))*ln(d*(1/d+f*x^2)),x,method=_RETURNVERBOSE)

[Out]

x*ln(d*f*x^2+1)*a-2*ln(c)*b*x+2*a/(d*f)^(1/2)*arctan(x*d*f/(d*f)^(1/2))+4*b*n*x+1/2*I*b*Pi*csgn(I*x^n)*csgn(I*
c*x^n)^2*x*ln(d*f*x^2+1)+I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*x+I*b*Pi*csgn(I*c*x^n)^3*x-b*n*(-d*f)^(1/2
)/d/f*ln(x)*ln(1+x*(-d*f)^(1/2))+b*n*(-d*f)^(1/2)/d/f*ln(x)*ln(1-x*(-d*f)^(1/2))+b*ln(c)*x*ln(d*f*x^2+1)+2*b*l
n(c)/(d*f)^(1/2)*arctan(x*d*f/(d*f)^(1/2))+b*ln(d*f*x^2+1)*ln(x^n)*x+2*b/(d*f)^(1/2)*arctan(x*d*f/(d*f)^(1/2))
*ln(x^n)+I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2/(d*f)^(1/2)*arctan(x*d*f/(d*f)^(1/2))-2*a*x-1/2*I*b*Pi*csgn(I*c)*c
sgn(I*x^n)*csgn(I*c*x^n)*x*ln(d*f*x^2+1)-I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)/(d*f)^(1/2)*arctan(x*d*f/(
d*f)^(1/2))+I*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2/(d*f)^(1/2)*arctan(x*d*f/(d*f)^(1/2))-2*b/(d*f)^(1/2)*arctan(x*d*
f/(d*f)^(1/2))*n*ln(x)-2*b*n/(d*f)^(1/2)*arctan(x*d*f/(d*f)^(1/2))-2*b*x*ln(x^n)+1/2*I*b*Pi*csgn(I*c)*csgn(I*c
*x^n)^2*x*ln(d*f*x^2+1)-b*n*(-d*f)^(1/2)/d/f*dilog(1+x*(-d*f)^(1/2))+b*n*(-d*f)^(1/2)/d/f*dilog(1-x*(-d*f)^(1/
2))-b*n*x*ln(d*f*x^2+1)-I*b*Pi*csgn(I*c*x^n)^3/(d*f)^(1/2)*arctan(x*d*f/(d*f)^(1/2))-I*b*Pi*csgn(I*x^n)*csgn(I
*c*x^n)^2*x-1/2*I*b*Pi*csgn(I*c*x^n)^3*x*ln(d*f*x^2+1)-I*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2*x

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(1/d+f*x^2)),x, algorithm="maxima")

[Out]

(b*x*log(x^n) - (b*(n - log(c)) - a)*x)*log(d*f*x^2 + 1) - integrate(2*(b*d*f*x^2*log(x^n) + (a*d*f - (d*f*n -
 d*f*log(c))*b)*x^2)/(d*f*x^2 + 1), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(1/d+f*x^2)),x, algorithm="fricas")

[Out]

integral(b*log(d*f*x^2 + 1)*log(c*x^n) + a*log(d*f*x^2 + 1), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \log {\left (c x^{n} \right )}\right ) \log {\left (d f x^{2} + 1 \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*ln(d*(1/d+f*x**2)),x)

[Out]

Integral((a + b*log(c*x**n))*log(d*f*x**2 + 1), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(1/d+f*x^2)),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)*log((f*x^2 + 1/d)*d), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \ln \left (d\,\left (f\,x^2+\frac {1}{d}\right )\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n)),x)

[Out]

int(log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n)), x)

________________________________________________________________________________________